﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Site1.Master" CodeBehind="sms_comments1.aspx.vb" Inherits="webfinancegdrassign4.sms_comments1" %>

<%--Smart Money $aver Project for University of Herts--%>
<%--Date: 01 December 2013--%>
<%--Version 1--%>
<%--Project Brief Description - This is a Smart Money Saver asp.net product using VB.net. It is intended to be used by Smart Money Savers who want to make and save money and earn and save a certain amount to benefit--%>
<%--Program Brief Description - This is the main Site.Master file. All change appear on all pages. This is a standard program from a default build from setting up the project in Visual Studio --%>
<%--Changes - Added an image for the Smart Investor program / website --%>
<%--Changes - Changed original Texts to 'Smart Money $aver ' --%>

<%--Update 1 -  5th Jan 2014 - sms_comments.aspx enabled page to allow admin user to update,delete and select data from Table --%>


<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript">
        function newPopup1(url) {
            popupWindow = window.open(
            url, 'popUpWindow', 'height=450,width=820,left=200,top=20,resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no')
        }

    </script>

    <style>
        .classrd {
        }

        .frm-rght-clr123 RadioButton lable {
        }

        .frm-rght-clr123 label {
            margin-top: -14px;
            display: block;
            margin-bottom: 5px;
        }

        .frm-rght-clr123 RadioButton, input, textarea, .uneditable-input {
            width: 120px;
        }
    </style>

    <asp:UpdatePanel ID="MyUpdatePanel" runat="server">
        <ContentTemplate>


    <div class="hero-unit">
        <script type="text/javascript">
            //document.getElementById("fl1").onchange = function () {
            //    document.getElementById("txtfl1").value = this.value;
            //} event.preventDefault();



        </script>


        <h2 style="color: #999;">Edit Comments Information<asp:Button runat="server" ID="btnAddComments" Text="Add Comments" CssClass="button" Style="float: right; width: 116px;" OnClientClick="JavaScript:newPopup1('AddComment.aspx');" />
        </h2>
        <input type="text" value="test" id="txtTest" runat="server" />

         <asp:Timer ID="Timer1" runat="server" Interval="3600" ontick="Timer1_Tick"></asp:Timer>

        <asp:GridView ID="GridView1" runat="server" DataKeyNames="ID" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowEditing="GridView1_RowEditing" OnRowDeleting="GridView1_RowDeleting" Width="100%" OnDataBound="GridView1_DataBound">
            <Columns>

                <asp:TemplateField HeaderText="Author">
                    <ItemStyle Width="10%" />
                    <ItemTemplate>
                        <asp:Label ID="lbla" runat="server" Text='<%# Eval("Author")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Comment">
                    <ItemStyle Width="20%" />
                    <ItemTemplate>
                        <asp:Label ID="lblb" runat="server" Text='<%# Eval("Comment")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Title">
                    <ItemStyle Width="15%" />
                    <ItemTemplate>
                        <asp:Label ID="lblc" runat="server" Text='<%# Eval("Title")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Money Data">
                    <ItemStyle Width="15%" />
                    <ItemTemplate>
                        <asp:Label ID="lbld" runat="server" Text='<%# Eval("sms_moneydata_fkId")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Rating">
                    <ItemStyle Width="15%" />
                    <ItemTemplate>
                        <asp:Label ID="lble" runat="server" Text='<%# Eval("rating")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="User Name">
                    <ItemStyle Width="15%" />
                    <ItemTemplate>
                        <asp:Label ID="lblf" runat="server" Text='<%# Eval("sms_username_fkid")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField Visible="false">
                    <ItemTemplate>
                        <asp:Label ID="lblg" runat="server" Text='<%# Eval("ID")%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <itemstyle width="5%" />
                        <asp:ImageButton ID="imgdelete" runat="server" CommandName="Delete" ToolTip="Delete" CausesValidation="false" Width="25" ImageUrl="~/img/Delete.png" OnClientClick="return confirm('Do you want to Delete this Recored')" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <itemstyle width="5%" />
                        <asp:ImageButton ID="imgEdit" runat="server" CommandName="Edit" ToolTip="Edit" CausesValidation="false" Width="25" ImageUrl="~/img/1leftarrow.png" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>

            <EditRowStyle BackColor="#FFFF99" />
            <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <RowStyle BackColor="#EFF3FB" />

        </asp:GridView>


        <br />
        <br />
        <div class="row-fluid">

            <table class="table">
                <tr>
                    <th colspan="5" class="td-head">
                        <span class="spanhead">Edit Comments Record<asp:Button ID="Button3" runat="server" Text="Edit" CssClass="button" Style="width: 70px; margin-left: 50px;" OnClick="Button3_Click" />&nbsp;<asp:Button ID="btncancel" runat="server" Text="Cancel" Width="80" CssClass="button" OnClick="btncancel_Click" />&nbsp;<asp:Button ID="Button2" runat="server" Height="36px" Width="156px" Text="Return to Main Menu" PostBackUrl="~/Account/Admininput.aspx" CssClass="button" /></span></th>
                </tr>
                <tr>
                    <td class="frm-lft-clr123" width="20%">
                        <asp:Label ID="Label1" runat="server" Text="Author"></asp:Label></td>
                    <td class="frm-rght-clr123" width="30%">
                        <asp:TextBox ID="txt_author" runat="server" CssClass="textbox" Width="200"></asp:TextBox></td>
                    <td class="frm-lft-clr123" width="20%">
                        <asp:Label ID="Label2" runat="server" Text="Comment"></asp:Label></td>
                    <td class="frm-rght-clr123" width="30%">
                        <asp:TextBox ID="txt_comment" runat="server" CssClass="textarea" TextMode="MultiLine" Rows="3" Width="200"></asp:TextBox></td>
                </tr>
                <tr>
                    <td class="frm-lft-clr123">
                        <asp:Label ID="Label3" runat="server" Text="Title"></asp:Label></td>
                    <td class="frm-rght-clr123">
                        <asp:TextBox ID="txt_title" CssClass="textbox" runat="server" Width="200"></asp:TextBox></td>
                    <td class="frm-lft-clr123">
                        <asp:Label ID="Label4" runat="server" Text="Money Data"></asp:Label></td>
                    <td class="frm-rght-clr123">
                        <asp:DropDownList ID="ddl_moneydata" runat="server" DataSourceID="SqlDataSource007" DataTextField="Company_Name" DataValueField="ID" Width="200px">
                        </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource007" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString07 %>" ProviderName="<%$ ConnectionStrings:ConnectionString07.ProviderName %>" SelectCommand="SELECT [ID], [Company_Name] FROM [sms_moneydata]"></asp:SqlDataSource>
                    </td>
                </tr>
                <tr>
                    <td class="frm-lft-clr123">
                        <asp:Label ID="Label5" runat="server" Text="Rating"></asp:Label></td>

                    <td class="frm-rght-clr123" style="border: 0px none none; padding: 10px; margin: 0px">
                        <asp:RadioButton ID="RadioButton1" runat="server" CssClass="classrd" GroupName="Star" Text="Star1" Style="border: 0px none none; padding: 0px; margin: 0px; float: left" />
                        <asp:RadioButton ID="RadioButton2" runat="server" CssClass="classrd" GroupName="Star" Text="Star2" Style="border: 0px none none; padding: 0px; margin: 0px;" />
                        <asp:RadioButton ID="RadioButton3" runat="server" CssClass="classrd" GroupName="Star" Text="Star3" Style="border: 0px none none; padding: 0px; margin: 0px; float: left" />
                        <asp:RadioButton ID="RadioButton4" runat="server" CssClass="classrd" GroupName="Star" Text="Star4" Style="border: 0px none none; padding: 0px; margin: 0px;" />
                        <asp:RadioButton ID="RadioButton5" runat="server" CssClass="classrd" GroupName="Star" Text="Star5" Style="border: 0px none none; padding: 0px; margin: 0px" />
                    </td>

                    <%--<td class="frm-lft-clr123">
                                <asp:Label ID="Label6" runat="server" Text="User Name"></asp:Label></td>
                            <td class="frm-rght-clr123">
                                <asp:TextBox ID="txt_username" CssClass="textbox" runat="server"></asp:TextBox>
                            </td>--%>
                </tr>

                <asp:HiddenField ID="hdn_id" runat="server" />
            </table>
        </div>
    </div>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
